var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (Child, Parent) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (Child, Parent) { Child.__proto__ = Parent; }) ||
            function (Child, Parent) { for (var p in Parent) if (b.hasOwnProperty(p)) Child[p] = Parent[p]; };
        return extendStatics(Child, Parent);
    };
    return function (Child, Parent) {
        extendStatics(Child, Parent);
        function __() { this.constructor = Child; }
        Child.prototype = Parent === null ? Object.create(Parent) : (__.prototype = Parent.prototype, new __());
    };
})();
var Parent = /** @class */ (function () {
    function Parent() {
        this.msg = "parent的msg属性";
    }
    Parent.prototype.show = function () {
        console.log("parent的show方法", this.msg);
    };
    return Parent;
}());
// TS中在class定义时 以 extends 方式描述需要继承的 class类
// 相当于JS中完成了原型链的指向操作
var Child = /** @class */ (function (Parent) {
    __extends(Child, Parent);
    function Child() {
        var _this = Parent !== null && Parent.apply(this, arguments) || this;
        _this.info = "child的info属性";
        return _this;
    }
    Child.prototype.print = function () {
        console.log("child的print方法", this.info);
    };
    return Child;
}(Parent));
var c = new Child();
